using System;
using System.Collections.Generic;
using System.Text;

namespace GPSCore
{
    /// <summary>
    /// This Class Rappresent a Satallite
    /// </summary>
    public class Satellite
    {
        #region members

        private SignalToNoiseRatio _snr;

        private Azimuth _azimuth;

        private Elevation _elevation;

        private bool _isFixObtained;

        private int _pseudoRandomNumber;

        private DateTime _timeStampFirstFix;

        #endregion

        #region constructors

        /// <summary>
        /// Base Satellite Constructors
        /// </summary>
        public Satellite()
        {
            _pseudoRandomNumber = -1;

            _azimuth = new Azimuth();
            _elevation = new Elevation();

            _isFixObtained = false;

            _snr = new SignalToNoiseRatio(0);
            _timeStampFirstFix = new DateTime((long)0);
        }

        /// <summary>
        /// Build a Satallite with PRN and location info
        /// </summary>
        /// <param name="PRN"></param>
        /// <param name="azimuth"></param>
        /// <param name="elevation"></param>
        public Satellite(int PRN, Azimuth azimuth, Elevation elevation)
        {
            _pseudoRandomNumber = PRN;

            _azimuth = azimuth;
            _elevation = elevation;

            _isFixObtained = false;

            _snr = new SignalToNoiseRatio(0);
            _timeStampFirstFix = new DateTime((long)0);
        }

        /// <summary>
        /// Build a Satellite knowing Pseudo Random Number
        /// </summary>
        /// <param name="PRN"></param>
        public Satellite(int PRN)
        {
            _pseudoRandomNumber = PRN;

            _azimuth = new Azimuth();
            _elevation = new Elevation();

            _isFixObtained = false;

            _snr = new SignalToNoiseRatio(0);
            _timeStampFirstFix = new DateTime((long)0);
        }

        #endregion

        #region properties

        /// <summary>
        /// Signal To Noise Ratio
        /// </summary>
        public SignalToNoiseRatio SNr
        {
            get { return _snr; }
            set { _snr = value; }
        }

        /// <summary>
        /// Satellite Azimut from this location.
        /// </summary>
        public Azimuth Azimuth
        {
            get { return _azimuth; }
            set { _azimuth = value; }
        }

        /// <summary>
        /// Satellite Elevation from this location
        /// </summary>
        public Elevation Elevation
        {
            get { return _elevation; }
            set { _elevation = value; }
        }

        /// <summary>
        /// Satellite is locked and can be used?
        /// </summary>
        public bool IsFixObtained
        {
            get { return _isFixObtained; }
            set { _isFixObtained = value; }
        }

        /// <summary>
        /// Satellite Pseudo Random Code
        /// </summary>
        public int PseudoRandomNumber
        {
            get { return _pseudoRandomNumber; }
            set { _pseudoRandomNumber = value; }
        }

        /// <summary>
        /// Time Stamp of the First Fix from this Satallite
        /// </summary>
        public DateTime TimeStampFirstFix
        {
            get { return _timeStampFirstFix; }
            set { _timeStampFirstFix = value; }
        }

        #endregion

        #region methos

        #endregion
    }
}
